2.2.4. Response
Field | Description | Type |
status | success | error | |
code | Error code | Integer |
message | Error text (optional) | String |
printError | Print error code (when using the cash register in case of a problem with receipt printing) | Integer |
documentID | ID of the document in the smartone Cashbox system (when using a cash register) | Integer |
fiscalID | Fiscal document code (use for return) | String |
fiscalNum | Document number | String |
docTime | Document creation date and time, format: yyyy-MM-dd hh:mm:ss | String |
printTime | Document closing date and time, format: yyyy-MM-dd hh:mm:ss | String |
docStatus | 0 - invoice not closed, 1 - invoice closed | Integer |
rrn | Transaction number of payment via bank terminal | String |
auth | Authorization code | String |
cardNum | Card number | String |
checkNum | Check number | String |
totalPayments | Array of document payments | Array |
totalPayments
{...} Array​
Field | Description | Type |
code | Payment type code | String |
amount | Payment amount in kopecks | Integer |
Error codes​
Field | Description |
0 | No error |
1 | Authorization error |
2 | Invalid JSON format |
3 | Required parameters not passed |
4 | The amount on the document does not correspond to the amount on the positions |
5 | Internal error |
6 | Shift not open |
7 | Payment type is not supported |
8 | The document is not fully paid (with automatic fiscalization) |
9 | Document not found |
11 | Change can only be issued in cash |
12 | Unacceptable tax percentage |
13 | Loan repayment can only be accepted by one type of payment at a time |
16 | Incorrect tax percentage |
Response example:​
{
  "auth": "796660",
  "card_num": "537541******5609",
  "checkNum": "",
  "documentID": 15,
  "extraParams": {},
  "fiscalID": "25",
  "fiscalNum": "25",
  "docTime": "",
  "printTime": "",
  "docStatus": "",
  "message": "",
  "rrn": "410910000017",
  "shiftOrdersCnt": 0,
  "status": "success"
}
Response structure:​
{
"status": "success",
"code": "integer, error code",
//0 – no error,
//1 – authorization error,
//2 – incorrect JSON format,
//3 – mandatory parameters are missing,
//4 – document total does not match item totals,
//5 – internal error,
//6 – cash register is not open,
//7 – unsupported payment type,
//8 – document is not fully paid (during automatic fiscalization),
//9 – document not found,
//11 – change can only be given for cash payment,
//12 – invalid tax percentage,
//13 – loan repayment can only be accepted with one payment type at a time,
//16 – incorrect tax percentage
"message": "string, error text, optional",
"printError": 0,
"documentID": 0,
"fiscalID": "string, fiscal document code (use for returns)",
"fiscalNum": "string, document number",
"docTime": "string, document creation date and time, format: yyyy-MM-dd hh:mm:ss",
"printTime": "string, document closing date and time, format: yyyy-MM-dd hh:mm:ss",
"docStatus": 0,
"rrn": "string, transaction number for payment via bank terminal",
"auth": "string, authorization code",
"cardNum": "string, card number",
"checkNum": "string, check number",
"totalPayments": [
{
"code": "string, payment type code",
"amount": "integer, payment amount in kopecks"
}
]
}